cmake_minimum_required(VERSION 3.5)

project(IMM-System LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 REQUIRED COMPONENTS Widgets Sql)



if(ANDROID)
  add_library(IMM-System SHARED
    Logger.hpp
    sqlmanagement.cpp
    sqlmanagement.h
    main.cpp
    mainwidget.h
    mainwidget.ui
    mainwidget.cpp
    usermanagement.h
    usermanagement.cpp
    MainWidget.qss
    register.ui
    register.h
    register.cpp
  )
else()
  add_executable(IMM-System
    Logger.hpp
    sqlmanagement.cpp
    sqlmanagement.h
    main.cpp
    mainwidget.h
    mainwidget.ui
    mainwidget.cpp
    usermanagement.h
    usermanagement.cpp
    MainWidget.qss
    register.ui
    register.h
    register.cpp

  )
endif()

target_link_libraries(IMM-System PRIVATE Qt5::Widgets Qt5::Sql)
